<template>
	<!-- 数组,set类型  v-for="(item:代表数组中每一个值, index:下标) in 循环的对象" >
	key 相当于vue 的id
	-->
	<div>
		<div v-for="(item, index) in arrp">
			{{ item }}
		</div>

		<div v-for="(val, key, i) in objp" :name="val">
			{{ val }}-- {{ i }}
			<span :id="`${key}px`">{{ key }} </span>
		</div>

		<!-- <div v-for="(item, index) in arr" :key="index">
			<div>{{ item }}</div>
			<div>{{ item }}</div>
			<div>{{ item }}</div>
		</div> -->

		<!-- if for slot -->
		<!-- <template v-for="(item, index) in arrp" :key="index">
			<div>{{ item }}</div>
			<div>{{ item }}</div>
			<div>{{ item }}</div>
		</template> -->
	</div>
</template>

<script setup>
	import {  reactive } from 'vue'
	// ref 基本数据类型 stirng 字符串,数字,boolean,null,undefined,symbol
	// reactive 引用对象类型, obj,array,map,set
	let arr = [10, 20, 30,40,50,60]
	let arrp = reactive(arr)
	// arrp.pop()
	// arrp.shift()
	// splice 删除中间 下标,1 
	arrp.splice(1,0,"张三")
	// 不可以直接的赋值
	// arrp = []
	// arrp.push(10)

	let dog = { type: '阿里斯', age: 10 }

	let obj = { name: 'ss', age: 'qin', shool: '青芒' }
	let objp = reactive(obj)
	objp['aa'] = '11086'

	delete objp.aa
	delete objp.shool

	Object.assign(objp,dog)
	objp = {name:'xhang'}
</script>

<style scoped></style>
